<el-tabs v-model="activeName2" type="card">
    <el-tab-pane label="基本资料" name="first">
        <el-row :gutter="10">
            <el-form ref="form" :model="form" :rules="rules" label-width="110px">
                <el-row :gutter="10">
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="产品编号" prop="GWAM001">
                            <el-input v-model="form.GWAM001" :readonly="!isAdd"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="品名" prop="GWAML003">
                            <el-input v-model="form.GWAML003"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="规格" prop="GWAML004">
                            <el-input v-model="form.GWAML004"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="来源码" prop="GWAM027">
                            <el-select v-model="form.GWAM027" size="small" placeholder="请选择来源码" clearable>
                                <el-option v-for="item in selectOptions.gwam027"
                                           :label="item.value" :value="item.code">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="助记码" prop="GWAML005">
                            <el-input v-model="form.GWAML005"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="类型" prop="GWAM005">
                            <el-select v-model="form.GWAM005" size="small" placeholder="请选择类型" @change="gwam005Change" clearable>
                                <el-option v-for="item in selectOptions.gwam005"
                                           :label="item.value" :value="item.code">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="归属母料号">
                            <el-input v-model="form.GWAM006" readonly clearable :disabled="gwam005">
                                <i class="el-icon-search el-input__icon" @click="openGwam006" slot="suffix" v-show="!gwam005">
                                </i>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="产品分类" prop="GWAM007_NAME">
                            <el-input v-model="form.GWAM007_NAME" @change="gwam007" readonly clearable>
                                <i class="el-icon-search el-input__icon" @click="openGwam007" slot="suffix">
                                </i>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="产品系列" prop="GWAM004_NAME">
                            <el-input v-model="form.GWAM004_NAME" @change="gwam004" readonly clearable>
                                <i class="el-icon-search el-input__icon" @click="openGwam004" slot="suffix">
                                </i>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="销售单位" prop="GWAM008">
                            <el-input v-model="form.GWAM008_NAME" readonly clearable>
                                <i class="el-icon-search el-input__icon" @click="openGwam008" slot="suffix">
                                </i>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="产品生命周期" prop="GWAM028">
                            <el-select v-model="form.GWAM028" size="small" placeholder="请选择产品生命周期" clearable>
                                <el-option v-for="item in selectOptions.crm_gwai500_gwam028"
                                           :label="item.value" :value="item.code">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <!--<el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="计价单位" prop="GWAM009">
                            <el-select v-model="form.GWAM009" size="small" placeholder="请选择计价单位">
                                <el-option v-for="item in selectOptions.options009"
                                           :key="item.GWAB001"
                                           :label="item.GWAB001 + item.GWABL003"
                                           :value="item.GWAB001">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>-->
                    <!--<el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="销售批量">
                            <el-input v-model="form.GWAM010"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="最小销售批量">
                            <el-input v-model="form.GWAM011"></el-input>
                        </el-form-item>
                    </el-col>-->
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="保固月数">
                            <el-input v-model="form.GWAM012"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="保固天数">
                            <el-input v-model="form.GWAM013"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="品牌" prop="GWAM002">
                            <el-input v-model="form.GWAM002"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="子品牌">
                            <el-input v-model="form.GWAM029"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="备注">
                            <el-input v-model="form.GWAM014"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="默认仓库">
                            <el-input v-model="form.GWAM019_NAME" @change="gwam019" readonly clearable>
                                <i class="el-icon-search el-input__icon" @click="openGwam019" slot="suffix"></i>
                            </el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="发货体积">
                            <el-input v-model="form.GWAM021" @change="gwam021"></el-input>
                        </el-form-item>
                    </el-col>
                    <!--<el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">-->
                    <!--<el-form-item label="宽">-->
                    <!--<el-input v-model="form.GWAM022"></el-input>-->
                    <!--</el-form-item>-->
                    <!--</el-col>-->
                    <!--<el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">-->
                    <!--<el-form-item label="高">-->
                    <!--<el-input v-model="form.GWAM023"></el-input>-->
                    <!--</el-form-item>-->
                    <!--</el-col>-->
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="发货重量">
                            <el-input v-model="form.GWAM024" @change="gwam024"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="HS码">
                            <el-input v-model="form.GWAM026"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="大小品号" prop="GWAM030">
                            <el-select v-model="form.GWAM030" clearable>
                                <el-option v-for="item in selectOptions.gwam030" :label="item.value"
                                           :value="item.code"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="6" :md="6" :lg="6" :xl="6">
                        <el-form-item label="有效否" prop="GWAMACTI">
                            <el-select v-model="form.GWAMACTI" clearable>
                                <el-option v-for="item in selectOptions.sys_y_n" :label="item.value"
                                           :value="item.code"></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                        <el-form-item label="测试文件链接" class="c-upload-text">
                            <el-input v-model="form.GWAM018"></el-input>
                            <el-upload
                                    class="upload-demo"
                                    ref="upload2"
                                    v-model="form.GWAM018"
                                    :action="files"
                                    :file-list="fileList"
                                    list-type="text"
                                    :on-preview="handleFilePreview"
                                    :before-upload="beforeUploadFiles"
                                    :on-remove="handleFileRemove"
                                    :on-success="successUploadFiles"
                                    :auto-upload="false">
                                <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
                            </el-upload>
                            <!--<a :href="address" target="_blank" style="width:40px;">下载</a>-->
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row :gutter="10">
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                        <el-form-item label="图片上传" class="c-upload-text" style="float: left;margin-left:0px;">
                            <el-upload v-if="!detailReadonly"
                                    class="upload-demo"
                                    ref="upload1"
                                    v-model="form.GWAM015"
                                    :file-list="imgList"
                                    :action="imgs"
                                    list-type="picture-card"
                                    :file-list="imgList"
                                    :before-upload="beforeUploadImg"
                                    :on-preview="handleImgPreview"
                                    :on-remove="handleJpgRemove"
                                    :on-success="successUploadImg"
                                    :before-upload="beforeUploadImg"
                                    :auto-upload="false" multiple>
                                <i class="el-icon-plus"></i>
                            </el-upload>
                            <el-dialog :visible.sync="dialogVisible" :modal-append-to-body="false">
                                <img width="100%" :src="dialogImageUrl" alt="">
                            </el-dialog>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                        <el-form-item label="视频上传" class="c-upload-text">
                            <!-- action必选参数, 上传的地址 -->
                            <!--:on-progress="uploadVideoProcess"-->
                            <el-upload class="avatar-uploader el-upload--text"
                                       ref="upload3"
                                       v-model="form.GWAM031"
                                       :action="uploadUrl"
                                       :file-list="videoList"
                                       :show-file-list="true"
                                       :on-preview="handleFilePreview"
                                       :on-remove="handleVideoRemove"
                                       :on-success="handleVideoSuccess"
                                       :before-upload="beforeUploadVideo"
                                       :auto-upload="false"
                                       limit="1">
                                <el-button slot="trigger" size="small" type="primary">选取视频文件</el-button>
                                <!--<video v-if="videoForm.Video !='' && videoFlag == false" :src="videoForm.Video" class="avatar" controls="controls"
                                       style="height: 87%; width: 99%;">您的浏览器不支持视频播放</video>
                                <i v-else-if="videoForm.Video =='' && videoFlag == false"></i>
                                <el-progress v-if="videoFlag == true" type="circle" :percentage="videoUploadPercent"
                                             style="margin-top:30px;"></el-progress>-->
                            </el-upload>
                        </el-form-item>
                        <!--<div class="avatar-uploader el-upload&#45;&#45;text" style="margin-top: -2%;margin-left: 110px;">
                            <P class="text">请保证视频格式正确，且不超过10M</P>
                        </div>-->
                    </el-col>
                </el-row>
                <el-col :xs="8" :sm="8" :md="8" :lg="8" :xl="8">
                    <template v-if="detailReadonly">
                        <el-carousel height="150px" indicator-position="none" id="GWAM015_IMGS">
                            <el-carousel-item v-for="item in imgList" :key="item" style="text-align: center">
                                <img :src="item.url" style="height: 100%" @click="bigShow(item.url)">
                            </el-carousel-item>
                        </el-carousel>
                    </template>
                </el-col>
            </el-form>
        </el-row>
    </el-tab-pane>
    <el-tab-pane label="参数" name="second">
        <el-form ref="form2" :model="form" :rules="rules" label-width="100px">
            <el-row :gutter="10">
                <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                    <el-form-item label="参数">
                        <el-input type="textarea" :rows="7" v-model="form.GWAM017"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
    </el-tab-pane>
    <el-tab-pane label="产品介绍" name="three">
        <el-form ref="form2" :model="form" :rules="rules" label-width="100px">
            <el-row :gutter="10">
                <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                    <el-form-item label="产品介绍">
                        <el-input type="textarea" :rows="7" v-model="form.GWAM016"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
    </el-tab-pane>
    <el-form>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" style="text-align: right">
            <el-button icon="icon iconfont icon-23" size="mini" @click="cancel">关闭</el-button>
            <el-button type="warning" icon="icon iconfont icon-21" size="mini" @click="sure" :disabled="detailReadonly">保存</el-button>
        </el-col>
    </el-form>
</el-tabs>
<!--<div id="imgFull" style="position: fixed;left: 0;right: 0;top: 0;bottom: 0;z-index: 999;background: rgba(0,0,0,.5);display: none">
    <div class="imgFull_btn" style="margin: 10px">
        <el-button icon="icon iconfont icon-23" type="primary" size="mini" @click="tranform1">右旋转90度</el-button>
        <el-button icon="icon iconfont icon-23" type="primary" size="mini" @click="tranform2">左旋转90度</el-button>
        <el-button icon="icon iconfont icon-23" type="primary" size="mini" @click="close">关闭</el-button>
    </div>
    <div id="imgFull_box" style="margin: 20px"></div>

</div>-->
<script>
    require(["pc/crm/gwai500_edit"], $.noop);
</script>
